package com.itlong.cloud.project.app;

import com.itlong.cloud.POJO.VO.app.AppRoomAuthVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      APP房间信息业务处理暴露接口
 * </desc>
 *
 * @createDate 2017/10/27
 */
@FeignClient(name = "project-service")
public interface IAppRoomServiceClient {
    /**
     * <desc>
     *      获取用户在项目中已认证的房屋
     * </desc>
     *
     * @param userId 用户id
     * @param projectId 项目id
     * @param owner 是否只查业主 1是 0否
     * @return
     * @author Jiaqi.X
     * @createDate 2017/10/27
     */
    @RequestMapping(path = "/app/room/getAuthRoom")
    List<AppRoomAuthVO> getUseRoomsByUserIdAndProjectId(@RequestParam("userId")String userId,
                                                        @RequestParam("projectId")String projectId,
                                                        @RequestParam("owner")String owner);

    /**
     * <desc>
     *      添加访客时在非社区场景下获取业主的地址楼层列表
     * </desc>
     *
     * @param userId 用户id
     * @param projectId 项目id
     * @param owner 是否只查业主 1是 0否
     * @return
     * @author Juguang.S
     * @createDate 2021/03/26
     */
    @RequestMapping(path = "/app/room/getOwnerUserFloorInfoByProjectId")
    List<AppRoomAuthVO> getOwnerUserFloorInfoByProjectId(@RequestParam("userId")String userId,
                                                        @RequestParam("projectId")String projectId,
                                                        @RequestParam("owner")String owner);

    /**
     * <desc>
     *      设置开门密码
     * </desc>
     *
     * @param projectId 项目id
     * @param userId 用户id
     * @param openPwd 开门密码
     * @return
     * @author Jiaqi.X
     * @createDate 2017/11/13
     */
    @RequestMapping(path = "/app/room/setOpenPwd")
    public Integer setOpenPwd(@RequestParam("projectId")String projectId,
                              @RequestParam("userId")String userId,
                              @RequestParam("openPwd")String openPwd) throws Exception;

    /**
     * <desc>
     *      获取当前房屋列表，app2.0版本新增
     * </desc>
     *
     * @return 房屋列表
     * @author wangzhi
     * @createDate 2019/06/27
     */
    @RequestMapping(path = "/app/room/getHomeList")
    Map<String,Object> getHomeList(@RequestParam("projectId") String projectId, @RequestParam("userId") String userId) throws Exception;
}
